from random import randint
class Die:
    """表示一个骰子的类"""

    def __init__(self,num_sides = 8):
        """默认骰子的面数为八"""
        self.num_sides = num_sides

    def rolling_die(self):
        """模拟投掷骰子"""
        return randint(1,self.num_sides)